#include "RuleHandler.h"
#include <cstdlib>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
	int option = atoi(argv[1]);
	float weight;
	
	if (option == 1)
	{
		addCat(argv[2]);
	}
	else if (option == 2)
	{
		weight = atof(argv[4]);
		addSubcat(argv[2], argv[3], weight);
	}
	else if (option == 3)
	{
		weight = atof(argv[4]);
		changeSubcatWeight(argv[2], argv[3], weight);
	}
	else if (option == 4)
        {
		weight = atof(argv[5]);
		addPhrase(argv[2], argv[3], argv[4], weight);
        }
	else if (option == 5)
        {
		weight = atof(argv[5]);
		changePhraseWeight(argv[2], argv[3], argv[4], weight);
        }
	else if (option == 6)
	{
		removeCat(argv[2]);
	}
	else if (option == 7)
	{
		removeSubcat(argv[2], argv[3]);
	}
	else if (option == 8)
	{
		removePhrase(argv[2], argv[3], argv[4]);
	}
	else if (option == 9)
	{
		applyRule(argv[2], argv[3], argv[4], false);
	}
	else if (option == 10)
        {
                applyRule(argv[2], argv[3], argv[4], true);
        }

	return 0;
}
